package com.borrowed.book.weixin.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName s_order_refund
 */
public class SOrderRefund implements Serializable {
    /**
     * 商户退款单号	
     */
    private String outRefundNo;

    /**
     * 微信支付退款单号
     */
    private String refundId;

    /**
     * 微信支付交易订单号
     */
    private String transactionId;

    /**
     * 商户订单号
     */
    private String orderNo;

    /**
     * 退款原因
     */
    private String reason;

    /**
     * 退款结果回调url
     */
    private String notifyUrl;

    /**
     * 退款渠道ORIGINAL：原路退款BALANCE：退回到余额  OTHER_BALANCE：原账户异常退到其他余额账户  OTHER_BANKCARD：原银行卡异常退到其他银行卡
     */
    private String channel;

    /**
     * 退款入账账户
     */
    private String userReceivedAccount;

    /**
     * 退款成功时间
     */
    private Date successTime;

    /**
     * 退款受理时间
     */
    private Date createTime;

    /**
     * 退款状态 枚举值：SUCCESS：退款成功 CLOSED：退款关闭 PROCESSING：退款处理中 ABNORMAL：退款异常
     */
    private String status;

    /**
     * 退款所使用资金对应的资金账户类型
枚举值：
UNSETTLED : 未结算资金
AVAILABLE : 可用余额
UNAVAILABLE : 不可用余额
OPERATION : 运营户
BASIC : 基本账户
     */
    private String fundsAccount;

    /**
     * 订单总金额，单位为分
     */
    private Integer total;

    /**
     * 退款标价金额，单位为分，可以做部分退款
     */
    private Integer refund;

    /**
     * 现金支付金额，单位为分，只能为整数
     */
    private Integer payerTotal;

    /**
     * 退款给用户的金额，不包含所有优惠券金额
     */
    private Integer payerRefund;

    /**
     * 应结退款金额 退款金额=申请退款金额-非充值代金券退款金额，退款金额<=申请退款金额
     */
    private Integer settlementRefund;

    /**
     * 应结订单金额=订单金额-免充值代金券金额，应结订单金额<=订单金额，单位为分
     */
    private Integer settlementTotal;

    /**
     * 优惠退款金额<=退款金额，退款金额-代金券或立减优惠退款金额为现金，说明详见代金券或立减优惠，单位为分
     */
    private Integer discountRefund;

    /**
     * 符合ISO 4217标准的三位字母代码，目前只支持人民币：CNY。
     */
    private String currency;

    private static final Long serialVersionUID = 1L;

    /**
     * 商户退款单号	
     */
    public String getOutRefundNo() {
        return outRefundNo;
    }

    /**
     * 商户退款单号	
     */
    public void setOutRefundNo(String outRefundNo) {
        this.outRefundNo = outRefundNo;
    }

    /**
     * 微信支付退款单号
     */
    public String getRefundId() {
        return refundId;
    }

    /**
     * 微信支付退款单号
     */
    public void setRefundId(String refundId) {
        this.refundId = refundId;
    }

    /**
     * 微信支付交易订单号
     */
    public String getTransactionId() {
        return transactionId;
    }

    /**
     * 微信支付交易订单号
     */
    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    /**
     * 商户订单号
     */
    public String getOrderNo() {
        return orderNo;
    }

    /**
     * 商户订单号
     */
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    /**
     * 退款原因
     */
    public String getReason() {
        return reason;
    }

    /**
     * 退款原因
     */
    public void setReason(String reason) {
        this.reason = reason;
    }

    /**
     * 退款结果回调url
     */
    public String getNotifyUrl() {
        return notifyUrl;
    }

    /**
     * 退款结果回调url
     */
    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    /**
     * 退款渠道ORIGINAL：原路退款BALANCE：退回到余额  OTHER_BALANCE：原账户异常退到其他余额账户  OTHER_BANKCARD：原银行卡异常退到其他银行卡
     */
    public String getChannel() {
        return channel;
    }

    /**
     * 退款渠道ORIGINAL：原路退款BALANCE：退回到余额  OTHER_BALANCE：原账户异常退到其他余额账户  OTHER_BANKCARD：原银行卡异常退到其他银行卡
     */
    public void setChannel(String channel) {
        this.channel = channel;
    }

    /**
     * 退款入账账户
     */
    public String getUserReceivedAccount() {
        return userReceivedAccount;
    }

    /**
     * 退款入账账户
     */
    public void setUserReceivedAccount(String userReceivedAccount) {
        this.userReceivedAccount = userReceivedAccount;
    }

    /**
     * 退款成功时间
     */
    public Date getSuccessTime() {
        return successTime;
    }

    /**
     * 退款成功时间
     */
    public void setSuccessTime(Date successTime) {
        this.successTime = successTime;
    }

    /**
     * 退款受理时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 退款受理时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 退款状态 枚举值：SUCCESS：退款成功 CLOSED：退款关闭 PROCESSING：退款处理中 ABNORMAL：退款异常
     */
    public String getStatus() {
        return status;
    }

    /**
     * 退款状态 枚举值：SUCCESS：退款成功 CLOSED：退款关闭 PROCESSING：退款处理中 ABNORMAL：退款异常
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * 退款所使用资金对应的资金账户类型
枚举值：
UNSETTLED : 未结算资金
AVAILABLE : 可用余额
UNAVAILABLE : 不可用余额
OPERATION : 运营户
BASIC : 基本账户
     */
    public String getFundsAccount() {
        return fundsAccount;
    }

    /**
     * 退款所使用资金对应的资金账户类型
枚举值：
UNSETTLED : 未结算资金
AVAILABLE : 可用余额
UNAVAILABLE : 不可用余额
OPERATION : 运营户
BASIC : 基本账户
     */
    public void setFundsAccount(String fundsAccount) {
        this.fundsAccount = fundsAccount;
    }

    /**
     * 订单总金额，单位为分
     */
    public Integer getTotal() {
        return total;
    }

    /**
     * 订单总金额，单位为分
     */
    public void setTotal(Integer total) {
        this.total = total;
    }

    /**
     * 退款标价金额，单位为分，可以做部分退款
     */
    public Integer getRefund() {
        return refund;
    }

    /**
     * 退款标价金额，单位为分，可以做部分退款
     */
    public void setRefund(Integer refund) {
        this.refund = refund;
    }

    /**
     * 现金支付金额，单位为分，只能为整数
     */
    public Integer getPayerTotal() {
        return payerTotal;
    }

    /**
     * 现金支付金额，单位为分，只能为整数
     */
    public void setPayerTotal(Integer payerTotal) {
        this.payerTotal = payerTotal;
    }

    /**
     * 退款给用户的金额，不包含所有优惠券金额
     */
    public Integer getPayerRefund() {
        return payerRefund;
    }

    /**
     * 退款给用户的金额，不包含所有优惠券金额
     */
    public void setPayerRefund(Integer payerRefund) {
        this.payerRefund = payerRefund;
    }

    /**
     * 应结退款金额 退款金额=申请退款金额-非充值代金券退款金额，退款金额<=申请退款金额
     */
    public Integer getSettlementRefund() {
        return settlementRefund;
    }

    /**
     * 应结退款金额 退款金额=申请退款金额-非充值代金券退款金额，退款金额<=申请退款金额
     */
    public void setSettlementRefund(Integer settlementRefund) {
        this.settlementRefund = settlementRefund;
    }

    /**
     * 应结订单金额=订单金额-免充值代金券金额，应结订单金额<=订单金额，单位为分
     */
    public Integer getSettlementTotal() {
        return settlementTotal;
    }

    /**
     * 应结订单金额=订单金额-免充值代金券金额，应结订单金额<=订单金额，单位为分
     */
    public void setSettlementTotal(Integer settlementTotal) {
        this.settlementTotal = settlementTotal;
    }

    /**
     * 优惠退款金额<=退款金额，退款金额-代金券或立减优惠退款金额为现金，说明详见代金券或立减优惠，单位为分
     */
    public Integer getDiscountRefund() {
        return discountRefund;
    }

    /**
     * 优惠退款金额<=退款金额，退款金额-代金券或立减优惠退款金额为现金，说明详见代金券或立减优惠，单位为分
     */
    public void setDiscountRefund(Integer discountRefund) {
        this.discountRefund = discountRefund;
    }

    /**
     * 符合ISO 4217标准的三位字母代码，目前只支持人民币：CNY。
     */
    public String getCurrency() {
        return currency;
    }

    /**
     * 符合ISO 4217标准的三位字母代码，目前只支持人民币：CNY。
     */
    public void setCurrency(String currency) {
        this.currency = currency;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SOrderRefund other = (SOrderRefund) that;
        return (this.getOutRefundNo() == null ? other.getOutRefundNo() == null : this.getOutRefundNo().equals(other.getOutRefundNo()))
            && (this.getRefundId() == null ? other.getRefundId() == null : this.getRefundId().equals(other.getRefundId()))
            && (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId()))
            && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
            && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))
            && (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl()))
            && (this.getChannel() == null ? other.getChannel() == null : this.getChannel().equals(other.getChannel()))
            && (this.getUserReceivedAccount() == null ? other.getUserReceivedAccount() == null : this.getUserReceivedAccount().equals(other.getUserReceivedAccount()))
            && (this.getSuccessTime() == null ? other.getSuccessTime() == null : this.getSuccessTime().equals(other.getSuccessTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getFundsAccount() == null ? other.getFundsAccount() == null : this.getFundsAccount().equals(other.getFundsAccount()))
            && (this.getTotal() == null ? other.getTotal() == null : this.getTotal().equals(other.getTotal()))
            && (this.getRefund() == null ? other.getRefund() == null : this.getRefund().equals(other.getRefund()))
            && (this.getPayerTotal() == null ? other.getPayerTotal() == null : this.getPayerTotal().equals(other.getPayerTotal()))
            && (this.getPayerRefund() == null ? other.getPayerRefund() == null : this.getPayerRefund().equals(other.getPayerRefund()))
            && (this.getSettlementRefund() == null ? other.getSettlementRefund() == null : this.getSettlementRefund().equals(other.getSettlementRefund()))
            && (this.getSettlementTotal() == null ? other.getSettlementTotal() == null : this.getSettlementTotal().equals(other.getSettlementTotal()))
            && (this.getDiscountRefund() == null ? other.getDiscountRefund() == null : this.getDiscountRefund().equals(other.getDiscountRefund()))
            && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOutRefundNo() == null) ? 0 : getOutRefundNo().hashCode());
        result = prime * result + ((getRefundId() == null) ? 0 : getRefundId().hashCode());
        result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode());
        result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
        result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());
        result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode());
        result = prime * result + ((getChannel() == null) ? 0 : getChannel().hashCode());
        result = prime * result + ((getUserReceivedAccount() == null) ? 0 : getUserReceivedAccount().hashCode());
        result = prime * result + ((getSuccessTime() == null) ? 0 : getSuccessTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getFundsAccount() == null) ? 0 : getFundsAccount().hashCode());
        result = prime * result + ((getTotal() == null) ? 0 : getTotal().hashCode());
        result = prime * result + ((getRefund() == null) ? 0 : getRefund().hashCode());
        result = prime * result + ((getPayerTotal() == null) ? 0 : getPayerTotal().hashCode());
        result = prime * result + ((getPayerRefund() == null) ? 0 : getPayerRefund().hashCode());
        result = prime * result + ((getSettlementRefund() == null) ? 0 : getSettlementRefund().hashCode());
        result = prime * result + ((getSettlementTotal() == null) ? 0 : getSettlementTotal().hashCode());
        result = prime * result + ((getDiscountRefund() == null) ? 0 : getDiscountRefund().hashCode());
        result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", outRefundNo=").append(outRefundNo);
        sb.append(", refundId=").append(refundId);
        sb.append(", transactionId=").append(transactionId);
        sb.append(", orderNo=").append(orderNo);
        sb.append(", reason=").append(reason);
        sb.append(", notifyUrl=").append(notifyUrl);
        sb.append(", channel=").append(channel);
        sb.append(", userReceivedAccount=").append(userReceivedAccount);
        sb.append(", successTime=").append(successTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", status=").append(status);
        sb.append(", fundsAccount=").append(fundsAccount);
        sb.append(", total=").append(total);
        sb.append(", refund=").append(refund);
        sb.append(", payerTotal=").append(payerTotal);
        sb.append(", payerRefund=").append(payerRefund);
        sb.append(", settlementRefund=").append(settlementRefund);
        sb.append(", settlementTotal=").append(settlementTotal);
        sb.append(", discountRefund=").append(discountRefund);
        sb.append(", currency=").append(currency);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}